//package com.liguilin.user.controller;
//
//import com.liguilin.common.utils.ApiResult;
//import com.liguilin.user.domain.Articles;
//import com.liguilin.user.domain.Users;
//import com.liguilin.user.service.UserHttpService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Lazy;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.client.RestTemplate;
//
//import java.util.List;
//
///**
// * @Auther: xf
// * @Date: 2018/12/18 20:34
// * @Description:
// */
//@RestController
//@RequestMapping(value = "/user")
//public class UserHttpController {
//
//    @Autowired
//    @Lazy
//    private UserHttpService userService;
//
//    @Autowired
//    private RestTemplate restTemplate;
//
//    @GetMapping("article/{id}")
//    public ApiResult getArticle(@PathVariable("id") String id){
//        ApiResult apiResult = this.restTemplate.getForObject("http://127.0.0.1:8082/article/" + id, ApiResult.class);
//        return apiResult;
//    }
//
//    @GetMapping("article/list")
//    public ApiResult getArticleList(){
//        ApiResult apiResult = this.restTemplate.getForObject("http://127.0.0.1:8082/article/list", ApiResult.class);
//        return apiResult;
//    }
//
//    @GetMapping("article/entityList")
//    public ApiResult getArticleEntityList(){
//        List<Articles> list = this.restTemplate.getForObject("http://127.0.0.1:8082/article/entityList", List.class);
//        return ApiResult.ok(list);
//    }
//
//    @GetMapping("/list")
//    public ApiResult list(){
//        List<Users> list = userService.list();
//        return ApiResult.ok(list);
//    }
//
//    @GetMapping("/{id}")
//    public ApiResult getInfo(@PathVariable(value = "id") String id){
//        Users user = userService.getInfo(id);
//        return ApiResult.ok(user);
//    }
//
//
//}
